/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.upn.sigemfi.can.beans;

import javax.faces.context.FacesContext;

/**
 *
 * @author Orlando ( U )
 */
public class PageController {

    private String contextPath;
    private String modulo;
    private String menu;
    private String opcion;

    public PageController() {
        this.contextPath = FacesContext.getCurrentInstance().getExternalContext().getRequestContextPath();
        this.modulo = "CAN";
        this.menu = "";
        this.opcion = "";
    }

    public String getContextPath() {
        return contextPath;
    }

    public void setContextPath(String contextPath) {
        this.contextPath = contextPath;
    }

    public String getMenu() {
        if (modulo.compareTo("CAN") == 0) {
            menu = (menu.compareTo("") == 0) ? "Gestion" : menu;
        }
        return menu;
    }

    public void setMenu(String menu) {
        this.menu = menu;
        this.opcion = "";
    }

    public String getModulo() {
        return modulo;
    }

    public void setModulo(String modulo) {
        this.modulo = modulo;
    }

    public String getOpcion() {
        return opcion;
    }

    public void setOpcion(String opcion) {
        this.opcion = opcion;
    }

  
}